<div class="grid_3 alpha"><input id="create" value="Crear Practica" type="button" onclick="window.location = '/editions/edit_practice/0';"/></div>
<div class="grid_6 omega" style="text-align:right;">
    <?php echo $paginator->prev()." ["; ?>
    <?php echo $paginator->numbers(); ?>
    <?php echo "] ".$paginator->next(); ?>
    <?php echo "&nbsp;&nbsp;[".$paginator->counter()."]"; ?>
</div>
<div class="clear"></div>


<?php echo $this->Form->create('Practica', array(
										'url'           => array('controller' => 'editions', 'action' => 'list_practice'),
										'inputDefaults' => array('label' => false, 'div' => false)
										)
								); ?>
    Filtrar por: <input type='text' name='filtro' value='<?php echo $filtro;?>' style='width:200px;height:24px;margin:4px;'>
    <input type='submit' value='Filtrar'>    
    <?php if (!empty($filtro)) {?>
        <input id="limpiar" value="Limpiar Filtro" type="button" onclick="window.location = '/editions/limpiar_filtro_practice';"/>
    <?php } ?>
    
</form>

<?php echo $this->Form->create('Practica', array(
                                        'url'           => array('controller' => 'editions', 'action' => 'delete_practice'),
                                        'inputDefaults' => array('label' => false, 'div' => false)
                                        )
                                ); ?>
    <br>
    <table width="100%">
        <thead>
            <tr>
                <th width="30">Select</th>
                <th width="20"><?php echo $this->Paginator->sort('id');?></th>
                <th><?php echo $this->Paginator->sort('Practica','name');?></th>
                <th nowrap><?php echo $this->Paginator->sort('Tipo','tipo');?></th>
                <th nowrap><?php echo $this->Paginator->sort('ID Interno','id_interno');?></th>
            </tr>
        </thead>
        <tbody>
        
    	<?php $i = 0;
    	foreach ($practices as $practice):
    		$class = null;
    		if ($i++ % 2 == 0) { $class = ' class="altrow"'; }
    	?>
            <tr>
                <td><input name="data[Delete][<?php echo $practice['Practice']['id'];?>]" value="1" id="Delete<?php echo $practice['Practice']['id'];?>" type="checkbox"/></td>
                <td><?php echo $practice['Practice']['id']; ?>&nbsp;</td>
                <td>
                    <?php echo $this->Html->link($practice['Practice']['name'],
                                array('controller' => 'editions', 'action' => 'edit_practice/'.$practice['Practice']['id'])); ?> 
                </td>     
                <td><?php echo $practice['Practice']['tipo'];?></td>                           
                <td><?php echo $practice['Practice']['id_interno'];?></td>                           
            </tr>
        <?php endforeach; ?>
        </tbody>
    </table>
    
	<br />    
	<div class="clear"></div>

	<div class="grid_3 alpha">
		<input name="delete" id="delete" value="Eliminar Seleccionados" type="submit" onclick="return confirm('Est&aacute; seguro de eliminar esos registros?');"/>
	</div>
	<div class="grid_6 omega" style="text-align:right;">
		<?php echo $paginator->prev()." ["; ?>
		<?php echo $paginator->numbers(); ?>
		<?php echo "] ".$paginator->next(); ?>
		<?php echo "&nbsp;&nbsp;[".$paginator->counter()."]"; ?>
	</div>
	<div class="clear"></div>
	<br />
	<div class="grid_3 alpha"><input id="create" value="Crear Practica" type="button" onclick="window.location = '/editions/edit_practice/0';"/></div>
	<div class="clear"></div>
</form>